package contracts.inspector

import org.springframework.cloud.contract.spec.Contract

Contract.make {
    request {
        method "GET"
        url "/api/inspector"
    }
    response {
        status 200
        body("""
            {
                "applicationName":"user-center",
                "profiles":"test"
            }
        """)
        bodyMatchers {
            jsonPath('$.profiles', byRegex("^\\w+\$"))
        }
        headers {
            header("Content-Type", "application/json;charset=UTF-8")
        }
    }
}